unit uFrmLog;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TFrmLog = class(TForm)
    Memo1: TMemo;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Memo1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
    function WriteLog(sMsg: string): Boolean;
  end;

var
  FrmLog: TFrmLog;

implementation

{$R *.dfm}

procedure TFrmLog.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caHide;
end;

function TFrmLog.WriteLog(sMsg: string): Boolean;
begin
  Memo1.Lines.Add(FormatDateTime('H:mm:ss  ',Now)+sMsg);
end;

procedure TFrmLog.Memo1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  Memo1.SetFocus;
end;

end.
